package org.jks.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "RolePrivilege")
public class RolePrivilege {
	public static final int TYPE_PAGE = 0;
	public static final int TYPE_MENU = 1;
	public static final int TYPE_BUTTON = 2;
	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	@Expose
	private long Id;
	@ManyToOne
	@JoinColumn(name = "role_id")
	private Role Role;
	@ManyToOne
	@JoinColumn(name = "privilege_id")
	@Expose
	private Privilege Privilege;
	@Expose
	private boolean Selected;
	@Expose
	private int Level;
	@Expose
	private int Pid;
	@Expose
	private int Type;

	public Role getRole() {
		return Role;
	}

	public void setRole(Role role) {
		Role = role;
	}

	public Privilege getPrivilege() {
		return Privilege;
	}

	public void setPrivilege(Privilege privilege) {
		Privilege = privilege;
	}

	public boolean isSelected() {
		return Selected;
	}

	public void setSelected(boolean selected) {
		Selected = selected;
	}

	public long getId() {
		return Id;
	}

	public void setId(long id) {
		Id = id;
	}

	public int getLevel() {
		return Level;
	}

	public void setLevel(int level) {
		Level = level;
	}

	public int getPid() {
		return Pid;
	}

	public void setPid(int pid) {
		Pid = pid;
	}

	public int getType() {
		return Type;
	}

	public void setType(int type) {
		Type = type;
	}

}
